/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-02-01 10:06:20
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-02-01 16:45:04
 * @FilePath: \ZHGD-Vue2\src\api\bitumenMixingStation\productionQuality\qualityMonitor.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// <!-- 生产质量监控 -->
import request from '@/utils/request'

// 沥青拌合楼
export function sysStationList(query) {
    return request({
        // url: '/zhgd/sysStation/list',
        url: '/zhgd/sysStation/listSelect',
        method: 'get',
        params: query
    })
}

// 图形最后数据接口
export function getLatestData(query) {
    return request({
        url: '/zhgd/asphaltData/getLatestData',
        method: 'get',
        params: query
    })
}


// 配方编号
export function getInitMatchCode(query) {
    return request({
        url: '/zhgd/asphaltData/getInitMatchCode',
        method: 'get',
        params: query
    })
}


// 摊铺层级
export function getcodelistall(query) {
    // codeid  摊铺层级codeid=CEMENT_PAVING_LEVEL   集科1——6   codeid=WATER_MIXTRUE
    return request({
      url: '/zhgd/codeitem/getcodelistall',
      method: 'get',
      params: query
    })
  }

  // 级配类型
export function asphaltMatchTypeList(query) {
    return request({
        url: '/zhgd/asphaltMatchType/listSelect',
        method: 'get',
        params: query
    })
}

// 列表查询沥青油石比检测
export function asphaltAlarmPage(query) {
    return request({
        url: '/zhgd/asphaltAlarm/page',
        method: 'get',
        params: query
    })
}

/**
 * 获取预警统计信息
 * @param {*} params 查询条件
 * @returns  预警统计信息
 */
export function getCount(params) {
    return request({
      url: '/zhgd/asphaltAlarm/count',
      method: 'get',
      params
    });
  }

  /**
 * 获取处置信息
 * @param {*} id 报警主键
 * @returns  处置信息
 */
export function getHandler(id) {
    return request({
      url: '/zhgd/asphaltAlarm/handler/' + id,
      method: 'get'
    });
  }

  /**
 * 修改预警信息
 * @param {*} data 预警处置信息
 * @returns  修改结果
 */
export function updateHandler(data) {
    return request({
      url: '/zhgd/asphaltAlarm/handlerEdit',
      method: 'post',
      data
    });
  }

  /**
 * 获取级配曲线数据
 * @param {*} id 数据主键
 * @returns 级配曲线数据
 */
export function getChartData(id) {
    return request({
      url: '/zhgd/asphaltDataSieve/getChartData/' + id,
      method: 'get'
    })
  }